<?php
require 'config.php';
require PATH_YSP .'ysp.config.php';
$controller = isset($_GET['C']) ? trim($_GET['C']) : 'Login';
$controller .= 'Page';

$action = isset($_GET['A']) ? trim($_GET['A']) : 'login';
require PATH_CONTROLLERS . "BasePage.php";
require PATH_CONTROLLERS . "$controller.php";
$obj = new $controller();
if (method_exists($obj, $action)) {
    $obj->$action();
}
unset($obj);
